package cn.wusifx.zabbix.request.builder.application;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.CreateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/application/create
 */
public class ApplicationCreateRequestBuilder extends CreateRequestBuilder {
    private String name;
    private String hostId;
    public ApplicationCreateRequestBuilder(String auth) {
        super("application.create", auth);
    }

    public ApplicationCreateRequestBuilder(Long id, String auth) {
        super("application.create", id, auth);
    }

    public String getName() {
        return name;
    }

    public ApplicationCreateRequestBuilder setName(String name) {
        this.name = name;
        return this;
    }

    public String getHostId() {
        return hostId;
    }

    public ApplicationCreateRequestBuilder setHostId(String hostId) {
        this.hostId = hostId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("name",name);
        baseRequest.getParams().put("hostid",hostId);
        return baseRequest;
    }
}
